{extend name='public/layout' /}
{block name='header'}
<header data-am-widget="header" class="am-header am-header-default">
    <div class="am-header-left am-header-nav">
        <a href="{:url('Index/index@m')}" class="am-btn  am-round am-icon-map-marker">
        {$cityInfo.name}
        </a>
    </div>
    <h1 class="am-header-title">
        <img src="{$site.mobileLogo}" alt="">
    </h1>
    <div class="am-header-right am-header-nav">
        <a href="#right-link" class="">
            <i class="am-header-icon am-icon-home"></i>
        </a>
    </div>
</header>
{/block}
{block name='content'}
<script src="__JS__/amazeui.min.js"></script>
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{"directionNav":false}' >
    <ul class="am-slides">
        {volist name='slides' id='vo'}
        <li>
            {$vo}
        </li>
        {/volist}
    </ul>
</div>
<div class="fang-content-categary fang-margin-tb">
    <ul class="am-avg-sm-4">
        <li>
            <a href="{:url('Loupan/index')}" title="新房">
                <span class="icon icon-house"></span>
                <span>新房</span>
            </a>
        </li>
        <li>
            <a href="{:url('Tuangou/index')}" title="团购">
                <span class="icon icon-group"></span>
                <span>团购</span>
            </a>
        </li>
        <li>
            <a href="{:url('Second/index')}" title="二手房">
                <span class="icon icon-second"></span>
                <span>二手房</span>
            </a>
        </li>
        <li>
            <a href="{:url('Chuzu/index')}" title="出租房">
                <span class="icon icon-rental"></span>
                <span>出租房</span>
            </a>
        </li>
        <li>
            <a href="{:url('Xiaoqu/index')}" title="小区">
                <span class="icon icon-estate"></span>
                <span>小区</span>
            </a>
        </li>
        <li>
            <a href="{:url('Huodong/index')}" title="活动">
                <span class="icon icon-activity"></span>
                <span>活动</span>
            </a>
        </li>
        <li>
            <a href="{:url('Question/index')}" title="问答">
                <span class="icon icon-question"></span>
                <span>问答</span>
            </a>
        </li>
        <li>
            <a href="{:url('News/index')}" title="资讯">
                <span class="icon icon-news"></span>
                <span>资讯</span>
            </a>
        </li>
    </ul>

</div>
<div class="fang-box fang-margin-b">
    <div class="fang-pannel">
        <a href="{:url('Loupan/index')}">更多></a>
        <span class="on">推荐楼盘</span>
    </div>
    <div class="lists-news-pic">
        <ul class="am-list">
            {volist name='house_position' id='data' empty='<li>暂无数据</li>'}
            <li>
                <a href="{:url('Loupan/detail',['id'=>$data['house_id']])}" title="{$data.title}" class="img"><img src="{$data.img}" onerror="this.src='__PUBLIC__/images/nopic.jpg'" alt="{$data.title}"></a>
                <dl>
                    <dt><a href="{:url('Loupan/detail',['id'=>$data['house_id']])}">{$data.title}</a></dt>
                    <dd class="price"><span>{$data.data.average_price}元/m<sup>2</sup></span>{$data.data.city_name}{$data.data.area_name}</dd>
                    <dd>地址:{$data.data.address}</dd>
                </dl>
            </li>
            {/volist}

        </ul>
    </div>
</div>
{notempty name='group'}
<div class="fang-box fang-margin-b">
    <div class="fang-pannel">
        <a href="{:url('Tuangou/index')}">更多></a>
        <span class="on">团购楼盘</span>
    </div>
    <div class="lists-news-pic">
        <ul class="am-list">
            {volist name='group' id='data' empty='<li>暂无数据</li>'}
            <li>
                <a href="{:url('Tuangou/detail',['id'=>$data['id']])}" title="{$data.title}" class="img"><img src="{$data.img}" onerror="this.src='__PUBLIC__/images/nopic.jpg'" alt="{$data.title}"></a>
                <dl>
                    <dt><a href="{$data.title}">{$data.title}</a></dt>
                    <dd class="price"><span>团购价{$data.price}元/m<sup>2</sup></span>已有 <em>{$data.buy_num}</em> 人报名</dd>
                    <dd>{$data.youhui}</dd>
                </dl>
            </li>
            {/volist}

        </ul>
    </div>
</div>
{/notempty}
{notempty name='second_position'}
<div class="fang-box fang-margin-b">
    <div class="fang-pannel">
        <a href="{:url('Second/index')}">更多></a>
        <span class="on">二手房</span>
    </div>
    <div class="lists-news-pic">
        <ul class="am-list">
            {volist name='second_position' id='data' empty='<li>暂无数据</li>'}
            <li>
                <a href="{:url('Second/detail',['id'=>$data['id']])}" title="{$data.title}" class="img"><img src="{$data.img}" onerror="this.src='__PUBLIC__/images/nopic.jpg'" alt="{$data.title}"></a>
                <dl>
                    <dt><a href="{:url('Second/detail',['id'=>$data['id']])}">{$data.title}</a></dt>
                    <dd class="price"><span>{$data.total_price}万元</span>{$data.room}室{$data.ting}厅{$data.wei}卫</dd>
                    <dd>{$data.contact}{$data.contact_phone}</dd>
                </dl>
            </li>
            {/volist}
        </ul>
    </div>
</div>
{/notempty}
<div class="fang-box fang-margin-b">
    <div class="fang-pannel">
        <a href="{:url('News/index')}">更多></a>
        <span class="on">新闻资讯</span>
    </div>
    <div class="am-list-news-bd">
        <ul class="am-list">{php}$time=time();{/php}
            {fang:lists table='article' field='id,title,create_time' where='status=1 and create_time < $time' order='ordid asc,id desc' limit='5' id='data'}
            <li class="am-g am-list-item-dated">
                <a href="{:url('News/detail',['id'=>$data['id']])}" class="am-list-item-hd ">{$data.title}</a>
                <span class="am-list-date">{$data.create_time|date='Y-m-d',###}</span>
            </li>
            {/fang:lists}

        </ul>
    </div>
</div>
{/block}